<template>
  <div class="ivu-global-footer i-copyright">
    <div class="footers acea-row">
      <div class="title mb15" v-text="copyrightNew"></div>
      <el-divider direction="vertical"></el-divider>
      <el-link v-for="item in links" :key="item.key" :href="item.href" target="_blank" class="mr15 mb20">{{
        item.title
      }}</el-link>
    </div>
  </div>
</template>
<script>


import { copyrightInfoApi } from '@/api/authInformation';

export default {
  name: 'i-copyright',
  data() {
    return {
      links: [
        {
          title: '官网',
          key: '1',
          href: 'https://www.crmeb.com',
          blankTarget: true,
        },
        {
          title: '社区',
          key: '2',
          href: 'https://q.crmeb.net/?categoryId=122&sequence=0',
          blankTarget: true,
        },
        {
          title: '文档',
          key: '3',
          href: 'https://help.crmeb.net/crmeb_java/1748037',
          blankTarget: true,
        },
      ],
      copyright: 'Copyright © 2023 西安众邦网络科技有限公司',
      copyrightNew: '',
    };
  },
  mounted() {
    this.getVersion();
  },
  methods: {
    getVersion() {
      copyrightInfoApi().then((res) => {
        const data = res || {};
        this.copyrightNew = data ? data : this.copyright;
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.ivu-global-footer {
  /* margin: 48px 0 24px 0; */
  /* padding: 0 16px; */
  // margin: 15px 0px;
  text-align: center;
  box-sizing: border-box;
  // margin-left: 210px;
}
.i-copyright {
  flex: 0 0 auto;
}
.ivu-global-footer-links {
  margin-bottom: 8px;
}
.ivu-global-footer-links a:not(:last-child) {
  margin-right: 40px;
}
.ivu-global-footer-links a {
  font-size: 14px;
  color: #808695;
  transition: all 0.2s ease-in-out;
}
.ivu-global-footer-copyright {
  color: #808695;
  font-size: 14px;
}
</style>
